import { face_Points, battle_log, group, face_attributes, SK_type, prop_min_type, bar, Sk_minType, rank_item, taskKey } from "../interface";
import { BaseMessage, BaseConf } from "./../protocols/base";
import { Api_skillInfo_effect } from "./body/skill/PtlLook";
export enum template {
    none = 'none',
    /**
     * 未注册用户,请注册
     */
    PleaseRegister = 'PleaseRegister',
    default_none = 'default_none',
    default = 'default',
    /**
     * 注册成功
     */
    RegisterSuccress = 'RegisterSuccress',
    /**
     * 显示当前位置
     */
    Position = 'panel_position',
    /**
     * 战斗日志
     */
    Battle_log = 'Battle_log',
    Battle_round = 'Battle_round',
    /**
     * 战斗结束日志
     */
    Battle_end = 'Battle_end',
    /**
     * 消息未命中任何功能
     */
    Msg_miss = 'Msg_miss',
    prop_look_equip = 'Prop_look_equip',
    /**
     * 背包道具模板
     */
    prop_info = 'panel_PropDefaultLook',
    /**
     * 属性面板
     */
    attribute = 'panel_attribute',
    attribute_pet = 'panel_attribute_pet',
    /**
     * 技能详细面板
     */
    skill_info = 'panel_skillInfo',
    /**
     * 天赋面板
     */
    panel_talent = 'panel_talent',
    /**
     * 血统面板
     */
    panel_job = 'panel_job',
    /**
     * 消费凭证
     */
    transactionLog = 'transactionLog',
    panel_equip = 'panel_equip',
    强化面板 = 'strengthen',
    /**
     * 地图
     */
    wordMap = 'wordMap',
    mailRead = 'MailRead',
    通用商店 = 'shop/default',
    通用任务 = 'Task/default',
    称号面板 = 'panel_title',
    拍卖行 = 'auction',
    小队信息 = 'team_info',
    通用副本 = 'Copy/default',
    通用奖励 = 'Gifts/default',
    猜数信息 = 'm_game/Guess/info',
    寻宝菜单 = 'm_game/searchGift/menu',
    金币抽奖菜单 = 'm_game/Lottery/menu',
    俄罗斯轮盘 = 'm_game/Roulette/menu'
}
export interface Tpl_gifts_default{
    exp?:number
    gold?:number
    title:string
    items:{name:string,num:number}[]
}
export interface Tpl_copy_default {
    title: string
    desc: string
    gift_title:string
    gift_list:string[]
    enter_str:string
}
export interface Tpl_guess{
    round:number
    min:number
    max:number
    gold:number
    cont:number
}
export interface Tpl_shop_default {
    title: string
    desc: string
    list: ({ name: string, type: prop_min_type, cont: number, price: number } | undefined)[]
    tips_look: string
    tips_buy: string
}
export interface Tpl_teamInfo {
    name: string
    desc: string
    leve: bar
    member_cont: number
    online_cont: number
    /**
     * 小队职位
     */
    team_job: number
    contribute: number
    nextTime: number
}
export interface Tpl_auction {
    id: string
    playerCont: number
    downTime: number
    item_info?: {
        item_template: template,
        item_data: any,
    }
    nowPrice: { name: string, uuid: string, price: number }
    priceList: { name: string, uuid: string, price: number }[]
}
export interface Tpl_rankInfo {
    rank_name:string
    list: rank_item[]
    query_rank: number
    query_name: string
}
export interface Tpl_wordMap {
    msg?:string
    list: number[][]
}
export interface Tpl_panel_equip {
    leve: bar
    name: string
    score: number
    from: string
    // points: face_Points
    att: face_attributes
}
export interface Tpl_panel_talent {
    title_style: string
    leve: bar
    style_id: string
    name: string
    points: face_Points
    max_points: face_Points
}

export interface Tpl_panel_title {
    style_id: string
    style_title_id: string
    title_value: face_attributes
}
export interface Tpl_panel_job {
    type: string
    style_id: string
    title_style: string
    points: face_Points
    leve: bar
}
/**
 * 邮件读取
 */
export interface Tpl_mailRead {
    create: number
    // 发件人
    from: {
        uuid: string
        name: string
    },
    title: string
    content: string
    annexs: { name: string, cont: number }[]
}
/**
 * 消息未命中任何功能
 */
export interface Tpl_msgMiss {
    str: string
}
export interface MsgAction extends BaseMessage {
    template: template | string,
    tolocation: string,
    data?: any
}
export interface Tpl_attribute {
    team_name: string
    render_type: string
    title_style: string
    dna_name:string
    name: string
    score: number
    leve: bar
    /**
     * 单位类型 不同类型将决定不同样式
     */
    body_type: string
    /**
     * 单位样式ID
     */
    style_id: string
    job_name: string

    /**
     * 天赋名称
     */
    Talent_name: string
    hp_now: number
    mp_now: number
    Points: face_Points
    attributes: face_attributes
}
export interface Tpl_attribute_pet {
    render_type: string
    name: string
    leve: bar
    score: number
    /**
     * 单位类型 不同类型将决定不同样式
     */
    body_type: string
    /**
     * 单位样式ID
     */
    style_id: string
    hp_now: number
    mp_now: number
    Points: face_Points
    attributes: face_attributes
}
export interface Tpl_skillInfo {
    cd: number,
    name: string,
    show: string,
    desc: string,
    useUp: string,
    score: number,
    leve: bar
    type: SK_type,
    minType: Sk_minType,
    /**
     * 效果具体数值
     */
    effectVal: Api_skillInfo_effect[],
}
export interface Tpl_battleLog {
    /**
     * 世界名称
     */
    word_name: string
    x: number
    y: number
    logs: battle_log[]
    // 击杀记录

    // 血量统计
    census: bar[]
    end?:Tpl_battleEnd
}
export interface Tpl_battleEnd {
    /**
     * 战斗持续回合数
     */
    round: number
    winGroup: group
    gifts: { user_name: string, user_id: string, info: any }[]
}
export interface Tpl_propEquip_look {
    name: string
    desc: string
    score: number
    from: string
    skills: { name: string, score: number, type: SK_type }[]
}
export interface Tpl_propDefault_look {
    name: string
    from: string
    score: number
    cont: number
    decs: string
    icon: string
    type: prop_min_type
    /**
     * 使用指令提示
     */
    instruct_tips?: string
    /**
     * 使用指令规范
     */
    instruct?: string
}
export const conf: BaseConf = {

}
export interface Tpl_Equip_strengthen{
    jude:boolean
    typeTitle:string
    info:{name:string,leve:number,score:number}
    att_last:face_attributes
    att_now:face_attributes
}
export interface Tpl_Task{
    title:string
    desc?:string
    taskList:{type:taskKey,v:number,now:number,desc?:string}[]
    reward:{name:string,num:number}[]
    end:boolean
}